package com.csy.chat;

import com.csy.chat.getCurrent_time;

public class chat_message {
    private StringBuffer time;
    private StringBuffer name;
    private StringBuffer talk;
    public chat_message()
    {

    }

    public chat_message(String time,String name,String talk)
    {
        this.time=new StringBuffer(time);
        this.name=new StringBuffer(name);
        this.talk=new StringBuffer(talk);
    }

    public chat_message(chat_message temp)
    {
        this.time=temp.time;
        this.name=temp.name;
        this.talk=temp.talk;
    }

    public String getTime()
    {
        return new String(this.time);
    }

    public StringBuffer getName()
    {
        return this.name;
    }

    public StringBuffer getTalk()
    {
        return this.talk;
    }

    public boolean empty()
    {
        if(this.time.equals("")&&
                this.name.equals("")&&this.talk.equals(""))
            return true;
        else
            return false;
    }

    public void clean()
    {
        this.time=null;
        this.talk=null;
        this.name=null;
    }
}
